﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="ViewPage<BonsaiScrum.Mvc.Models.SprintProj>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sprints for <%= Html.Encode(Model.Name) %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Sprints for <%= Html.Encode(Model.Name) %></h2>

    <table>
        <tr>
            <th>Start Date</th>
            <th>End Date</th>
            <th>Description</th>
        </tr>

    <% if (Model.Sprints != null)
       {
           foreach (var item in Model.Sprints)
           { %>
    
        <tr>
            <td>
                <%= Html.Encode(item.StartDate)%>
            </td>
            <td>
                <%= Html.Encode(item.EndDate)%>
            </td>
            <td>
                <%= Html.Encode(item.Description)%>
            </td>
            <td>
                <%= Html.ActionLink("Edit", "Update", new { sprintId = item.Id }, null )%>
            </td>
        </tr>
    
    <% }
       } %>
       

    </table>
    <% if (Model.Sprints == null)
       { %> No Sprints have been made.  Please create one.
       <% } %>
    <p>
        <%= Html.ActionLink("Create New Sprint", "Create", new { projectId = Model.ProjectID }, null )%>
        <%= Html.ActionLink("Back to Project Dashboard", "Dashboard", "Project", new { id = Model.ProjectID }, null) %>
    </p>

</asp:Content>
